/*
package com.sjb.mianshiya.model.dto.question;

import cn.hutool.json.JSONUtil;
import com.sjb.mianshiya.model.domain.Question;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

*/
/**
 * @Author:sjb
 * @CreateTime:2024-11-15
 * @Description: 题目Es实体类
 * @Version：1.0
 *//*

@Data
//@Document(indexName = "question_v1")
public class QuestionEsDto implements Serializable {

    private static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";

    private static final long serialVersionUID = 76560296355081206L;


    @Id
    private Long id;


    private String title;


    private String content;


    private String answer;


    private List<String> tags;


    private Long userId;

    */
/**
     * 创建时间
     *//*

    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = DATE_TIME_PATTERN)
    private Date createTime;

    */
/**
     * 更新时间
     *//*

    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = DATE_TIME_PATTERN)
    private Date updateTime;

    */
/**
     * 是否删除
     *//*

    private Integer isDelete;


    */
/**
     * 对象转实体类
     * @param question
     * @return
     *//*

    public static QuestionEsDto objToDto(Question question) {
        if (question == null){
            return null;
        }
        QuestionEsDto questionEsDto = new QuestionEsDto();
        BeanUtils.copyProperties(question, questionEsDto);
        String tagStr = question.getTags();
        if (StringUtils.isNotEmpty(tagStr)){
            questionEsDto.setTags(JSONUtil.toList(tagStr,String.class));
        }
        return questionEsDto;
    }

    */
/**
     * 包装类转对象
     * @param questionEsDto
     * @return
     *//*

    public static Question dtoToObj(QuestionEsDto questionEsDto) {
        if (questionEsDto == null){
            return null;
        }
        Question question = new Question();
        BeanUtils.copyProperties(questionEsDto, question);
        if (questionEsDto.getTags() != null){
            question.setTags(JSONUtil.toJsonStr(questionEsDto.getTags()));
        }
        return question;
    }
}
*/
